﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace HindernisGame
{
    class menuButton
    {
        public bool selected;
        public Texture2D bild;
        public Rectangle area;
        public int index;

        public menuButton(Rectangle Area, Texture2D Bild, int index, bool selected)
        {
            area = Area;
            bild = Bild;
            this.index = index;
            this.selected = selected;
        }

        public void Draw(SpriteBatch spriteBatch, SpriteFont font)
        {
            if (selected == false)
            {
                spriteBatch.Draw(bild, new Rectangle(area.X, area.Y, area.Width, area.Height), Color.White );
            }
            if (selected == true)
            {
                spriteBatch.Draw(bild, new Rectangle(area.X, area.Y, area.Width, area.Height), Color.Cyan);
            }
        }
    }
}
